package com.qs.javame.thread.collection;

import java.util.concurrent.ConcurrentLinkedQueue;

public class TestConcurrentLinkedQueue {

    public static void main(String[] args) {
        ConcurrentLinkedQueue<String> linkedQueue = new ConcurrentLinkedQueue<>();
        linkedQueue.offer("aaa");
        linkedQueue.offer("bbb");
        linkedQueue.offer("ccc");
        System.out.println(linkedQueue);

        linkedQueue.remove("aaa");
        System.out.println(linkedQueue);

        String firstNode = linkedQueue.poll();
        System.out.println("-->>firstNode=" + firstNode);
        System.out.println(linkedQueue);

        System.out.println(linkedQueue.poll());
        System.out.println(linkedQueue.poll());
    }
}
